<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./font_3563144_r08xsnaf3l/iconfont.css">
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            list-style: none;
            background-color: #eee;
        }

        header {
            /* display: flex; */
            height: 60px;
            background-color: rgba(1, 152, 204);
            color: white;
        }

        header h3 {
            float: left;
            text-align: center;
            line-height: 60px;
        }

        header div {
            float: right;
            text-align: center;
            line-height: 60px;
        }

        .bigbox {
            display: flex;
        }

        .left {
            background-color: rgba(45, 62, 80);
            color: white;
            text-align: center;
            line-height: 60px;
            /* height: 100%; */
            width: 200px;
        }

        .right {
            width: 100%;
        }

        .header {
            width: 100%;
            height: 78px;
            display: flex;
            justify-content: space-between;
        }

        .header span:nth-child(1) {
            background-color: rgba(45, 62, 79);
            color: white;
            margin-left: 36px;
            text-align: center;
            line-height: 78px;
        }

        .header span:nth-child(2) {
            background-color: white;
            color: black;
            margin-right: 36px;
            text-align: center;
            line-height: 78px;
        }

        .two {
            display: flex;
            justify-content: space-around;
        }

        .money {
            background-color: rgba(1, 152, 204);
            height: 100px;
            width: 20%;
            color: white;
            position: relative;
        }

        .money span {
            font-size: 40px;
            position: absolute;
            right: 10px;
            top: 6px;
        }

        .money1 {
            height: 100px;
            width: 20%;
            color: white;
            position: relative;
            background-color: rgba(20, 195, 118);
        }

        .money1 span {
            font-size: 40px;
            position: absolute;
            right: 10px;
            top: 6px;
        }

        .money2 {
            height: 100px;
            width: 20%;
            color: white;
            position: relative;
            background-color: rgba(143, 144, 128);
        }

        .money2 span {
            font-size: 40px;
            position: absolute;
            right: 10px;
            top: 6px;
        }

        .photo {
            display: flex;
            justify-content: space-around;
        }

        .zhutu {
            background-color: white;
            height: 390px;
            width: 45%;
            margin-top: 10px;
        }

        .zhetu {
            background-color: white;
            height: 390px;
            width: 45%;
            margin-top: 10px;
        }

        table {
            background-color: white;
            width: 97.5%;
            height: 500px;
            text-align: center;
        }

        .biaoge {
            margin-left: 34px;
            margin-top: 10px;
        }
    </style>
</head>

<body>
    <header>
        <h3>后台管理系统</h3>
        <div>角色:管理员</div>
        <div>当前用户:bootstrap中文</div>
    </header>
    <div class="bigbox">
        <div class="left">
            <li>
                <span class="iconfont icon-zhuye"></span>
                后台首页 >
            </li>
            <li>
                <span class="iconfont icon-liebiao"></span>
                设计元素 >
            </li>
            <li>
                <span class="iconfont icon-tianchongxing-"></span>
                表单元素 >
            </li>
            <li>
                <span class="iconfont icon-diannao"></span>
                示例页面 >
            </li>
            <li>
                <span class="iconfont icon-shuanglieliebiao"></span>
                常用列表 >
            </li>
            <li>
                <span class="iconfont icon-yemian"></span>
                脚本插件 >
            </li>
            <li>
                <span class="iconfont icon-chart"></span>
                统计图表 >
            </li>
        </div>
        <div class="right">
            <div class="header">
                <span>欢迎首页</span>
                <span>页签操作</span>
            </div>
            <div class="two">
                <div class="money">
                    <p>今日收入</p>
                    <p>100,000.00</p>
                    <span class="iconfont icon-qiandai"></span>
                </div>
                <div class="money">
                    <p>昨日收入</p>
                    <p>200,000.00</p>
                    <span class="iconfont icon-qian"></span>
                </div>
                <div class="money1">
                    <p>月度累计收入</p>
                    <p>1,000,000.00</p>
                    <span class="iconfont icon-qian1"></span>
                </div>
                <div class="money2">
                    <p>年度累计收入</p>
                    <p>5,000,000.00</p>
                    <span class="iconfont icon-qian"></span>
                </div>
            </div>
            <div class="photo">
                <div class="zhutu"></div>
                <div class="zhetu"></div>
            </div>
            <div class="biaoge">
                <table>
                    <thead>
                        <tr>
                            <td>#</td>
                            <td>订单号</td>
                            <td>商品名称</td>
                            <td>下单日期</td>
                            <td>状态</td>
                            <td>处理情况</td>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>1</td>
                            <td>2333</td>
                            <td>黑色牛仔裤</td>
                            <td>2020-05-21</td>
                            <td>完成</td>
                            <td>已完成</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</body>

</html>
<script src="./promise-ajax.js"></script>
<script src="./mock.js"></script>
<script src="./mockdata.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.4.0/echarts.js"></script>
<script src="./photo.js"></script>
<script>

    // 声明变量
    var zhuTu = document.querySelector('.zhutu');
    var zheTu = document.querySelector('.zhetu');

    // 柱状图
    var myCharts = echarts.init(zhuTu);
    var option;
    option && myCharts.setOption(option);


    // 折线图
    var myChart = echarts.init(zheTu);
    var options;
    options && myChart.setOption(options);


    // 声明变量


    render(data.list)

    function render(data) {
        var str = data.map((item, index) => {
            return `<tr>
                        <td>${item.num}</td>
                        <td>${item.shopnum}</td>
                        <td>${item.name}</td>
                        <td>${item.birth}</td>
                        <td>${item.status}</td>
                        <td><progress value="${item.jinnum}" max="100"></td>
                   </tr>`
        }).join('')

        document.querySelector('table tbody').innerHTML = str;
    }
</script>